package com.wry.spring.extension;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

/**
 * <h1>  </h1>
 *
 * @author wry
 * @since 2025.04.06
 */
@Component
public class MyApplicationListener implements ApplicationListener<ContextRefreshedEvent> {

    @Override
    public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
        Object orderServiceImpl = contextRefreshedEvent.getApplicationContext().getBean("orderServiceImpl");
        System.out.println("ContextRefreshedEvent -> " + orderServiceImpl);
    }
}
